from rapidocr import RapidOCR
# 不指定params，默认使用ppocrv4;设定使用ppocrv5（需要安装ImportError: paddle is not installed）
engine = RapidOCR(config_path="conf/config.yaml")
img_url = "https://github.com/RapidAI/RapidOCR/blob/main/python/tests/test_files/ch_en_num.jpg?raw=true"
# img_url="https://work8.top/static/uploads/2025/09/32087ee3fab34e50abceda923e6a90f9.png"
# img_url="https://raw.githubusercontent.com/AylerH/ImagehostingOnlineUrl/master/image_files/ele-image.jpg"#正式的图片
# img_url="https://raw.githubusercontent.com/AylerH/ImagehostingOnlineUrl/master/image_files/ele-open-button-clear.jpg"
img_url="input_files/法兰垫片-ocr识别图片.png"
result = engine(img_url)

print(result)

result.vis("vis_result.jpg")